feat(inputs.smartctl): device name to attribute metrics#18679
feat(inputs.smartctl): device name to attribute metrics#18679hackery wants to merge 2 commits intoinfluxdata:masterfrom
Conversation
Optional `metric_version` flag changes tag usage in the `smartctl_attributes` metrics to make `name` the device name (consistent with its use in the `smartctl` metrics) and putting the attribute name in a new `attribute` tag.
| ## making it harder to associate them to the "smartctl" metrics. | ||
| ## metric_version = 2 will use the "name" tag for the the device name, | ||
| ## and a new "attribute" tag for the attribute name. | ||
| metric_version = 1 |
There was a problem hiding this comment.
Default values can be commented out
| metric_version = 1 | |
| # metric_version = 1 |
|
@srebhan via Slack suggested using a more specific option like enforce_device_name_tag, and also asked for a unit test to be added. I hope to get to that today and will update PR. |
|
If your PR is not ready to be reviewed, please mark it as Draft. |
|
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
|
@hackery any chance you work on this PR? |
|
@srebhan yes, I'm going to rework it based on your suggestion. If I don't get to it this week, it'll be delayed as I'm away for two weeks after that. |
Summary
Optional
metric_versionflag changes tag usage in thesmartctl_attributesmetrics to makenamethe device name (consistent with its use in thesmartctlmetrics) and putting the attribute name in a newattributetag.I don't know if this is the correct way to achieve this.
metric_versionis used elsewhere for similar purposes, but here seems a bit of a sledgehammer for a single tag name change. Would welcome alternative suggestions and quite prepared for PR to be rejected.Checklist
Related issues
resolves #18385